/******************************************************************************
* Copyright (C) 2010-2011 Computer Graphics Systems Group at the 
* Hasso-Plattner-Institute (HPI), Potsdam, Germany.
*
* Lecture : Geovisualisation Summer Term 2011
* Exercise: Processing Rendering OpenStreetMap Data 
*
* Author: sebastian.pasewaldt@hpi.uni-potsdam.de
*
******************************************************************************/

#ifndef __CONFIGWIDGET_H__
#define __CONFIGWIDGET_H__


//[-------------------------------------------------------]
//[ Includes                                              ]
//[-------------------------------------------------------]

#include <QtGui/QWidget>
#include <QtGui/QLayout>
#include <QtGui/QTextBrowser>
#include <osg/Node>


//[-------------------------------------------------------]
//[ Classes                                               ]
//[-------------------------------------------------------]

class ConfigWidget: public QWidget
{
	Q_OBJECT
	
	//[-------------------------------------------------------]
    //[ Public functions                                      ]
    //[-------------------------------------------------------]
    public:
		/**
		*  @brief
		*    Constructor
		*/
        ConfigWidget(QWidget* parent);
		~ConfigWidget();
		
		/**
		*  @brief
		*    adds a QCheckBox with text=name that can be used to toggle
		*    the state of node
		*/
		void atNodeAsCheckBox(osg::Node* node, QString name);
		
		/**
		*  @brief
		*  displays text in a QTextBrowser  
		*/
		void displayText(QString text);

    //[-------------------------------------------------------]
    //[ Private functions                                     ]
    //[-------------------------------------------------------]
    private:
	

	//[-------------------------------------------------------]
	//[ Private slots                                         ]
	//[-------------------------------------------------------]
	private slots:
		void checkBoxStateChanged(int checkState);

		
	//[-------------------------------------------------------]
    //[ Private data                                          ]
    //[-------------------------------------------------------]
    private:
		QVBoxLayout* m_layout;
		QTextBrowser* m_textBrowser;
		QList<osg::ref_ptr<osg::Node> > m_NodeList;

};


#endif // __CONFIGWIDGET_H__